/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seari.service.impl;

import com.seari.bean.Product;
import com.seari.bean.RlProductHost;
import com.seari.mapper.ProductMapper;
import com.seari.service.ProductService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 *
 * @author whl
 */
@Service("productService")
public class ProductServiceImpl implements ProductService
{
    @Autowired
    private ProductMapper productMapper;

    @Override
    public List<Product> getProductByFMcId(Product product) {
        return productMapper.getProductByFMcId(product);
    }

    @Override
    public List<Product> getProductById(Product product) {
        return productMapper.getProductById(product);
    }

    @Override
    public int addProductBatch(List<Product> productList) {
        return productMapper.addProductBatch(productList);
    }

    @Override
    public int updateProductById(Product product) {
        return productMapper.updateProductById(product);
    }

    @Override
    public int deleteProductById(Product product) {
        return productMapper.deleteProductById(product);
    }

    @Override
    public int addRlProductHost(RlProductHost rlProductHost) {
        return productMapper.addRlProductHost(rlProductHost);
    }

    @Override
    public int deleteRlProductHost(RlProductHost rlProductHost) {
        return productMapper.deleteRlProductHost(rlProductHost);
    }

    @Override
    public int updateRlProductHost(RlProductHost rlProductHost) {
        return productMapper.updateRlProductHost(rlProductHost);
    }

    @Override
    public List<RlProductHost> getRlProductHost(RlProductHost rlProductHost) {
        return productMapper.getRlProductHost(rlProductHost);
    }

    @Override
    public List<Map<String, String>> showAllZabbixHosts(Map<String, String> map) {
        return productMapper.showAllZabbixHosts(map);
    }
}
